
<link href="../addons/jy_jdpm/resource/css/mobile/my-auction.css" rel="stylesheet" type="text/css" onload="$('#load-html').show()">
    <style>
        .tab-header ul li a {
            color: #000000;
        }
        .tab-header ul li a.no {
            color: red;
        }
        #nontList{
            width: 100%;
            height: 50px;
            display: block;
            text-align: center;
            padding: 15px;
            color: #7f7f7f;
        }
    </style>
    <div class="tab" id="load-html" style="display:none;">
        <div class="tab-header">
            <ul>
                <li ng-class="{'active':pagedata.status==0}" >
                    <a ng-class="{'no':pagedata.status==0}" href="javascript:;" ng-click="access()">全部</a>
                </li>
                <li ng-class="{'active':pagedata.status==1}" href="javascript:;" ng-click="access_json('///status=1')">
                    <a ng-class="{'no':pagedata.status==1}" >参拍中</a>
                </li>
                <li ng-class="{'active':pagedata.status==2}" href="javascript:;" ng-click="access_json('///status=2')">
                    <a ng-class="{'no':pagedata.status==2}" >已拍获</a>
                </li>
                <li ng-class="{'active':pagedata.status==3}" href="javascript:;" ng-click="access_json('///status=3')">
                    <a ng-class="{'no':pagedata.status==3}" >未拍中</a>
                </li>
            </ul>
        </div>
        <div class="tab-content">
            <div class="con1">
                <ul class="follow-list">
                    <p ng-if="pagedata.list.length<=0" style="text-align: center;padding-top: 20px;color: #ccc">没有参与的拍品呢..</p>
                        <li ng-repeat="item in pagedata.list" class="follow-item">
                            <a ng-click="access_json('/details//pid='+item.pid)">
                            <div class="follow-item-con">
                                <div class="img-box">
                                    <img ng-src="{{tomedia(item.images)}}" alt="">
                                    <p class="baozhenjin">保证金：{{item.price/2}}元</p>
                                </div>
                                <div class="goods-info">
                                    <div>
                                        <div class="goods-name">{{item.name}}</div>
                                        <div class="count">竞价次数：
                                            <span class="color-red">{{item.bidCount}}</span>
                                        </div>
                                        <div class="current-price" style="padding-left: 2px;">当&nbsp;前&nbsp;竞&nbsp;价：
                                            <span class="color-red number">¥{{item.present}}</span>
                                        </div>
                                        <div class="current-price">当前成交价：
                                            <span class="color-red number">¥{{item.bargain}}</span>
                                        </div>
                                        <div class="current-price" style="padding-left: 1px;">&nbsp;&nbsp;起&nbsp;&nbsp;拍&nbsp;&nbsp;价&nbsp;：
                                            <span class="color-red number">¥{{item.onset}}</span>
                                        </div>
                                        <div>
                                            <div class="status">
                                                <span class="text">拍卖中</span><span class="times" times="{{item.endTime}}">{{date(item.endTime)}}</span></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            </a>
                        </li>
                </ul>
            </div>
        </div>
        <div style="width: 100%;height: 50px;display: block;"></div>
    </div>
   <div ng-include="sys_html('common/w_footer')"></div>
    <script type="text/javascript">
        function showTime(tuanid, time_distance) {
            this.tuanid = tuanid;
            //PHP时间是秒，JS时间是微秒
            this.time_distance = time_distance * 1000 - new Date().getTime();
        }

        showTime.prototype.setTimeShow = function () {
            var timer = this.tuanid;
            var str_time;
            var int_day, int_hour, int_minute, int_second;
            time_distance = this.time_distance;
            this.time_distance = this.time_distance - 1000;
            if (time_distance > 0) {
                int_day = Math.floor(time_distance / 86400000);
                time_distance -= int_day * 86400000;
                int_hour = Math.floor(time_distance / 3600000);
                time_distance -= int_hour * 3600000;
                int_minute = Math.floor(time_distance / 60000);
                time_distance -= int_minute * 60000;
                int_second = Math.floor(time_distance / 1000);
                if (int_hour < 10)
                    int_hour = "0" + int_hour;
                if (int_minute < 10)
                    int_minute = "0" + int_minute;
                if (int_second < 10)
                    int_second = "0" + int_second;
                str_time = int_day + "天" + int_hour + "小时" + int_minute + "分" + int_second + "秒";
                timer.text(str_time);
                var self = this;
                setTimeout(function () {
                    self.setTimeShow();
                }, 1000); //D:正确
            } else {
                timer.parent().find('.text').text('拍卖结束').css('background-color','#999');
                return;
            }
        };
        $('.times').each(function (key, value) {
            var st = new showTime($(this), parseInt($(this).attr('times')));
            st.setTimeShow();
        })
    </script>